﻿using FubuMVC.Core;

namespace complex.Controllers.Customers
{
    public class PageOfCustomersOutputModel
        : Page<CustomerSummaryOutputModel>
    {
    }

    public class CustomerSummaryOutputModel
    {
        public long Id { get; set; }
        public string Name { get; set; }
        public string BillingAddress { get; set; }
    }

    public class ViewCustomersInputModelQuery
    {
        public int ItemsPerPage { get; set; }

        [RouteInput]
        public int Page { get; set; }

        public ViewCustomersInputModelQuery()
        {
            ItemsPerPage = 5;
            Page = 1;
        }

        public int StartAt()
        {
            return (Page - 1)*ItemsPerPage;
        }
    }
}